/*
 * @Copyright: (C) 2019 Zhang Rida. All rights reserved.
 *
 * @Author: Zhang Rida
 * @Email: 215154317@qq.com
 * @FilePath: /WEILA_SDK_MODULE/include/wl_utils.h
 * @Date: 2021-02-18 15:07:07
 * @Description:type define for weila osal
 *
 * @LastEditors: Zhang Rida
 * @LastEditTime: 2024-09-05 10:30:27
 */
#ifndef _WL_UTILS_H
#define _WL_UTILS_H

#include "wl_types.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

void      wl_sleep(wl_uint32 seconds);
void      wl_msleep(wl_uint32 milliseconds);
wl_time   wl_utctime(void);
wl_int32  wl_localtime(wl_tm* tm);
wl_char*  wl_strdup(const wl_char* s);
wl_uint16 wl_ntohs(wl_uint16 netshort);
wl_uint32 wl_getElapsedTick(void);
void      wl_wgs84togcj02(wl_double wgLat, wl_double wgLon, wl_double* mgLat, wl_double* mgLon);
wl_double wl_getdistance(wl_double lng1, wl_double lat1, wl_double lng2, wl_double lat2);

wl_char* wl_strtok_r(wl_char* str, const wl_char* delim, wl_char** saveptr);

wl_uint32 RSHash(wl_char* str, wl_uint32 len);
wl_uint32 JSHash(wl_char* str, wl_uint32 len);

#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _WL_UTILS_H */
